#ifndef WALL_H
#define WALL_H
#include <iostream>
#include "main.h"

using namespace std;

class Wall
{
public:
    enum Type { ErrorType, Outside, Inside, Ground, Roof };
    enum Neighbour { ErrorNeighbour, OutsideN, OutsideS, OutsideW, OutsideE, Soil, Sky, Room };

    Wall(int width, int height, Type type, Neighbour neighbour, string neighbourRoom = "");

    // wall characteristics
    int width;
    int height;
    double surface;
    Type type;
    Neighbour neighbour;

    string neighbourRoom;

    double maxPower;
    double currentPower;

    // koeficient pro jednodussi vypocet
    double totalCoefficient;
    // koeficient pro slozitejsi vypocet
    double complexCoefficient;
    // ztrata tepla
    double heatLoss;

    double maxTemperatureDifference;
    double currentTemperature;
    double newTemperature;

    // relazacni doba
    double tauZero;

    double neighbourTemperature;

    void setSize(int width, int height);
    void setType(Type type);
    void setNeighbour(Neighbour neighbour);

    void addMaterial();
    void countNewTemperature(double input);
    void countNewTemperatureComplex(double input);

    static Type getTypeFromStr(string str);
    static Neighbour getNeighbourFromStr(string str);

private:
    void setMaxTemperatureDifference(double max, double min);
    void countSurface();
    void countMaxPower();

};

#endif // WALL_H
